package com.daoeping.data;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Bsc_jobtype entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "bsc_jobtype", catalog = "daoeping")
public class Bsc_jobtype implements java.io.Serializable {

	// Fields

	private Integer id;
	private String name;
	private String description;
	private Integer parentId;
	private Set<Usr_projectexperience> usr_projectexperiences = new HashSet<Usr_projectexperience>(
			0);
	private Set<Bzn_jobdescription> bzn_jobdescriptions = new HashSet<Bzn_jobdescription>(
			0);

	// Constructors

	/** default constructor */
	public Bsc_jobtype() {
	}

	/** minimal constructor */
	public Bsc_jobtype(String name) {
		this.name = name;
	}

	/** full constructor */
	public Bsc_jobtype(String name, String description, Integer parentId,
			Set<Usr_projectexperience> usr_projectexperiences,
			Set<Bzn_jobdescription> bzn_jobdescriptions) {
		this.name = name;
		this.description = description;
		this.parentId = parentId;
		this.usr_projectexperiences = usr_projectexperiences;
		this.bzn_jobdescriptions = bzn_jobdescriptions;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name", nullable = false, length = 200)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "description", length = 200)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "parent_id")
	public Integer getParentId() {
		return this.parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bsc_jobtype")
	public Set<Usr_projectexperience> getUsr_projectexperiences() {
		return this.usr_projectexperiences;
	}

	public void setUsr_projectexperiences(
			Set<Usr_projectexperience> usr_projectexperiences) {
		this.usr_projectexperiences = usr_projectexperiences;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bsc_jobtype")
	public Set<Bzn_jobdescription> getBzn_jobdescriptions() {
		return this.bzn_jobdescriptions;
	}

	public void setBzn_jobdescriptions(
			Set<Bzn_jobdescription> bzn_jobdescriptions) {
		this.bzn_jobdescriptions = bzn_jobdescriptions;
	}

}